package com.ruoyi.project.beautyflower.stagingMonths.service;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.beautyflower.stagingMonths.mapper.StagingMonthsMapper;
import com.ruoyi.project.beautyflower.stagingMonths.domain.StagingMonths;
import com.ruoyi.project.beautyflower.stagingMonths.service.IStagingMonthsService;
import com.ruoyi.common.support.Convert;

/**
 * 分期月数设置 服务层实现
 * 
 * @author lxs
 * @date 2018-10-09
 */
@Service
public class StagingMonthsServiceImpl implements IStagingMonthsService 
{
	@Autowired
	private StagingMonthsMapper stagingMonthsMapper;

	/**
     * 查询分期月数设置信息
     * 
     * @param id 分期月数设置ID
     * @return 分期月数设置信息
     */
    @Override
	public StagingMonths selectStagingMonthsById(Integer id)
	{
	    return stagingMonthsMapper.selectStagingMonthsById(id);
	}
	
	/**
     * 查询分期月数设置列表
     * 
     * @param stagingMonths 分期月数设置信息
     * @return 分期月数设置集合
     */
	@Override
	public List<StagingMonths> selectStagingMonthsList(StagingMonths stagingMonths)
	{
	    return stagingMonthsMapper.selectStagingMonthsList(stagingMonths);
	}
	
    /**
     * 新增分期月数设置
     * 
     * @param stagingMonths 分期月数设置信息
     * @return 结果
     */
	@Override
	public int insertStagingMonths(StagingMonths stagingMonths)
	{
	    return stagingMonthsMapper.insertStagingMonths(stagingMonths);
	}
	
	/**
     * 修改分期月数设置
     * 
     * @param stagingMonths 分期月数设置信息
     * @return 结果
     */
	@Override
	public int updateStagingMonths(StagingMonths stagingMonths)
	{
	    return stagingMonthsMapper.updateStagingMonths(stagingMonths);
	}

	/**
     * 删除分期月数设置对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteStagingMonthsByIds(String ids)
	{
		return stagingMonthsMapper.deleteStagingMonthsByIds(Convert.toStrArray(ids));
	}
	
}
